<?php
    require("includes/basic.php");
   	if(isset($_REQUEST['id']))
	{
        $sql = "select * from client_logo where client_id=".$_REQUEST['id'];
 
        // the result of the query
        $result = mysql_query("$sql");
		$resultr = mysql_fetch_array($result);
		extract($resultr);
		$type=$resultr['type'];
        // set the header for the image
        header("Content-type: $type");
        echo $resultr['content'];
	}
	if(isset($_REQUEST['vid']))
	{
		$sql = "select * from vendor_logo where vendor_id=".$_REQUEST['vid'];
 
        // the result of the query
        $result = mysql_query("$sql");
		$resultr = mysql_fetch_array($result);
		extract($resultr);
		$type=$resultr['type'];
        // set the header for the image
        header("Content-type: $type");
        echo $resultr['content'];
	}
	if(isset($_REQUEST['cuid']))
	{
		
		$sql = "select * from customer_logo where customer_id='".$_REQUEST['cuid']."'";
		
 
        // the result of the query
        $result = mysql_query($sql);
		$resultr = mysql_fetch_array($result);
		extract($resultr);
		$type=$resultr['type'];
        // set the header for the image
        header("Content-type: $type");
        echo $resultr['content'];
		
		
	}
	
	
?> 